<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "people".
 *
 * @property int $id
 * @property string $name
 * @property string $age
 * @property string $email
 * @property string $cellphone
 * @property string $avatar
 * @property string $gender
 * @property string $address
 * @property int $status
 * @property int $created_at
 * @property int $updated_at
 */
class People extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'people';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['name', 'age', 'email', 'cellphone', 'avatar', 'gender', 'created_at', 'updated_at'], 'required'],
            [['status', 'created_at', 'updated_at'], 'integer'],
            [['name', 'email', 'cellphone', 'avatar', 'gender', 'address'], 'string', 'max' => 255],
            [['age'], 'string', 'max' => 32],
            [['name'], 'unique'],
            [['email'], 'unique'],
            [['address'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Name',
            'age' => 'Age',
            'email' => 'Email',
            'cellphone' => 'Cellphone',
            'avatar' => 'Avatar',
            'gender' => 'Gender',
            'address' => 'Address',
            'status' => 'Status',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }
}
